package com.xwj.validation.custom.dto;

import com.xwj.validation.custom.valid.ListValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Author: xiaowajiang
 * @Date: 2022-03-13 15:13
 * @Description: 学生实体
 **/
@Data
@ApiModel(value = "CustomStudentDTO", description = "学生")
public class StudentDTO implements Serializable {
    private static final long serialVersionUID = -2126505372397894307L;


    // 姓名
    @NotBlank(message = "姓名必须填写")
    @ApiModelProperty(value = "姓名", required = true)
    private String name;

    // 显示状态[0-不显示，1-显示]
    @NotNull(message = "显示状态必须填写")
    @ListValue(values = { 0, 1 })
    @ApiModelProperty(value = "显示状态[1：显示，0：不显示]")
    private Integer showStatus;

}
